import dva from 'dva';
import './index.css';

// 1. Initialize
// const app = dva();
const app = dva({
   initialState: {
     products: [
       { name: 'dva', id: 1 , mobile:123, username:'test1'},
       { name: 'antd1', id: 2 , mobile:3456, username: 'test25'},
       { name: 'antd2', id: 3 , mobile:3457, username: 'test24'},
       { name: 'antd3', id: 4 , mobile:3458, username: 'test23'},
       { name: 'antd4', id: 5 , mobile:3458, username: 'test22'},
     ],
   },
 });

// 2. Plugins
// app.use({});

// 3. Model
// app.model(require('./models/example'));
app.model(require('./models/products'));

// 4. Router
app.router(require('./router'));

// 5. Start
app.start('#root');
